<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>

<jsp:include page="helpers/layout_header.jsp"></jsp:include>

<%-- body --%>
<c:choose>
	<c:when test="${sessionScope.usuario.tipo eq 'ADMIN' }">
		<jsp:include page="helpers/header_admin.jsp" />
	</c:when>
	<c:otherwise>
		<jsp:include page="helpers/header_usuario.jsp" />
	</c:otherwise>
</c:choose>

<div id="items" class="row">
	<h3>Lista de Eventos</h3>
	
	<div class="small-12 columns content">
		
		<c:choose>
			<c:when test="${temEvento eq 'S' }">
				<c:forEach items="${listaEventos }" var="evento">
					<div class="medium-6 large-3 columns">
						<ul class="pricing-table">
							<li class="title"><c:out value="${evento.nome }"/></li>
							<li class="price">R$ <c:out value="${evento.valorTicket }"/></li>
							<li class="description"><c:out value="${evento.descricao }" /></li>
							<li class="bullet-item"><c:out value="${evento.qtdTickets }" /></li>
							<li class="bullet-item"><c:out value="${evento.dtInicio }" /></li>
							<li class="bullet-item"><c:out value="${evento.dtFim }" /></li>
							<li class="cta-button"><a class="button round" href="comprarTicket?evt=${evento.codigo }">Comprar</a></li>
						</ul>
					</div>
				</c:forEach>
			</c:when>
			<c:otherwise>
				<div class="panel">
					<h5>Eita!</h5>
					<p>Não há eventos disponíveis.</p>
				</div>
			</c:otherwise>
		</c:choose>
		
	</div>
</div>

<%-- /body --%>

<jsp:include page="helpers/layout_footer.jsp"></jsp:include>